package com.thh.project.controller;

import com.thh.project.common.exception.ExceptionCast;
import com.thh.project.model.common.dtos.ResponseResult;
import com.thh.project.model.common.enums.AppHttpCodeEnum;
import com.thh.project.model.user.pojos.ApUser;
import com.thh.project.model.user.pojos.TestPojo;
import com.thh.project.service.ApUserLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.Date;

@RestController
@RequestMapping("/api/test")
public class TestController {

    @GetMapping("/getTime")
    public ResponseResult getTime( Date date) {
        //2018-01-31T14:32:19Z
       return ResponseResult.okResult(date.toString());
    }


    @PostMapping("/getTest")
    public ResponseResult getTest(@RequestBody TestPojo testPojo) {
        //2018-01-31T14:32:19Z
        return ResponseResult.okResult(testPojo);
    }
}
